//
//  DisFirstTableViewCell.m
//  LT
//
//  Created by dllo on 16/5/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DisFirstTableViewCell.h"
#import "UIImageView+WebCache.h"
@implementation DisFirstTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return  self;
}

//初始化控件并给坐标
-(void)createSubViews{
    
    NSLog(@"=======");
    self.phoImage = [[UIImageView alloc]init];
   // self.phoImage.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.phoImage];
    
    
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.phoImage.frame = CGRectMake(5 * WIDTHCELL, 5 * WIDTHCELL, (self.contentView.frame.size.width - 10), (self.contentView.frame.size.height - 10));
    
    
}

-(void)setDisSubModel:(DisSubTwoModel *)disSubModel{
    _disSubModel = disSubModel;
    [self.phoImage sd_setImageWithURL:[NSURL URLWithString:_disSubModel.photo] placeholderImage:[UIImage imageNamed:@"LeTu"]];

}

-(void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
